﻿<%@ Page Title="Customers" Language="C#" MasterPageFile="~/Master Page/MainMaster.Master"
    AutoEventWireup="true" CodeBehind="Customers.aspx.cs" Inherits="Vortex.Customer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cpHeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" runat="server">
    <asp:LoginView ID="LoginView2" runat="server">
        <AnonymousTemplate>
            You must be logged in to view this
        </AnonymousTemplate>
        <LoggedInTemplate>
            You're account has not been accesed yet.
            <br />
            Please contact an Administrator for more information.
        </LoggedInTemplate>
        <RoleGroups>
            <asp:RoleGroup Roles="Admin,Manager">
                <ContentTemplate>
                    <div style="overflow: scroll">
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                            BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
                            CellPadding="0" DataKeyNames="SalesOrder" DataSourceID="SqlDataSource1" GridLines="Vertical"
                            Width="100px" PageSize="5">
                            <AlternatingRowStyle BackColor="#DCDCDC" />
                            <Columns>
                                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                                <asp:BoundField DataField="SalesOrder" HeaderText="Sales#" InsertVisible="False"
                                    ReadOnly="True" SortExpression="SalesOrder" />
                                <asp:BoundField DataField="Sourcing" HeaderText="Sourcing" SortExpression="Sourcing" />
                                <asp:BoundField DataField="ClientContact" HeaderText="ClientName" SortExpression="ClientContact" />
                                <asp:BoundField DataField="ClientAddress" HeaderText="Address" SortExpression="ClientAddress" />
                                <asp:BoundField DataField="ClientState" HeaderText="State" SortExpression="ClientState" />
                                <asp:BoundField DataField="Zip" HeaderText="Zip" SortExpression="Zip" />
                                <asp:BoundField DataField="ContactPhoneNumber" HeaderText="PhoneNumber" SortExpression="ContactPhoneNumber" />
                                <asp:BoundField DataField="ContactEmail" HeaderText="Email" SortExpression="ContactEmail" />
                                <asp:BoundField DataField="pId" HeaderText="ProductID" SortExpression="pId" />
                                <asp:BoundField DataField="Quantity" HeaderText="Quantity" SortExpression="Quantity" />
                                <asp:BoundField DataField="LastContact" HeaderText="LastContact" SortExpression="LastContact" />
                            </Columns>
                            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                            <SortedAscendingCellStyle BackColor="#F1F1F1" />
                            <SortedAscendingHeaderStyle BackColor="#0000A9" />
                            <SortedDescendingCellStyle BackColor="#CAC9C9" />
                            <SortedDescendingHeaderStyle BackColor="#000065" />
                        </asp:GridView>
                    </div>
                    <asp:Button ID="btnShow" runat="server" OnClick="btnShow_Click" Text="Insert New Item" />
                    <asp:DetailsView ID="DetailsView2" runat="server" AutoGenerateRows="False" BackColor="White"
                        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="SalesOrder"
                        DataSourceID="SqlDataSource1" Height="50px" Width="125px" Visible="False">
                        <EditRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                        <Fields>
                            <asp:TemplateField HeaderText="SalesOrder" InsertVisible="False" 
                                SortExpression="SalesOrder">
                                <EditItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("SalesOrder") %>'></asp:Label>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("SalesOrder") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Sourcing" SortExpression="Sourcing">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Sourcing") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Sourcing") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Sourcing") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ClientContact" SortExpression="ClientContact">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("ClientContact") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("ClientContact") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("ClientContact") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ClientAddress" SortExpression="ClientAddress">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("ClientAddress") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("ClientAddress") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("ClientAddress") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ClientState" SortExpression="ClientState">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("ClientState") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("ClientState") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("ClientState") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Zip" SortExpression="Zip">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("Zip") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("Zip") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label6" runat="server" Text='<%# Bind("Zip") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ContactPhoneNumber" 
                                SortExpression="ContactPhoneNumber">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox6" runat="server" 
                                        Text='<%# Bind("ContactPhoneNumber") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox6" runat="server" 
                                        Text='<%# Bind("ContactPhoneNumber") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label7" runat="server" Text='<%# Bind("ContactPhoneNumber") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ContactEmail" SortExpression="ContactEmail">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("ContactEmail") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("ContactEmail") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label8" runat="server" Text='<%# Bind("ContactEmail") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="pId" SortExpression="pId">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("pId") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("pId") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label9" runat="server" Text='<%# Bind("pId") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Quantity" SortExpression="Quantity">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("Quantity") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("Quantity") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label10" runat="server" Text='<%# Bind("Quantity") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="LastContact" SortExpression="LastContact">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox10" runat="server" Text='<%# Bind("LastContact") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox10" runat="server" Text='<%# Bind("LastContact") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label11" runat="server" Text='<%# Bind("LastContact") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="EmployeeId" SortExpression="EmployeeId">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox11" runat="server" Text='<%# Bind("EmployeeId") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox11" runat="server" Text='<%# Bind("EmployeeId") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label12" runat="server" Text='<%# Bind("EmployeeId") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField ShowInsertButton="True" />
                        </Fields>
                        <FooterStyle BackColor="White" ForeColor="#000066" />
                        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                        <RowStyle ForeColor="#000066" />
                    </asp:DetailsView>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                        DeleteCommand="DELETE FROM [Sales] WHERE [SalesOrder] = @SalesOrder" InsertCommand="INSERT INTO [Sales] ([Sourcing], [ClientContact], [ClientAddress], [ClientState], [Zip], [ContactPhoneNumber], [ContactEmail], [pId], [Quantity], [LastContact], [EmployeeId]) VALUES (@Sourcing, @ClientContact, @ClientAddress, @ClientState, @Zip, @ContactPhoneNumber, @ContactEmail, @pId, @Quantity, @LastContact, @EmployeeId)"
                        SelectCommand="SELECT * FROM [Sales] ORDER BY [SalesOrder]" UpdateCommand="UPDATE [Sales] SET [Sourcing] = @Sourcing, [ClientContact] = @ClientContact, [ClientAddress] = @ClientAddress, [ClientState] = @ClientState, [Zip] = @Zip, [ContactPhoneNumber] = @ContactPhoneNumber, [ContactEmail] = @ContactEmail, [pId] = @pId, [Quantity] = @Quantity, [LastContact] = @LastContact, [EmployeeId] = @EmployeeId WHERE [SalesOrder] = @SalesOrder">
                        <DeleteParameters>
                            <asp:Parameter Name="SalesOrder" Type="Int32" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="Sourcing" Type="String" />
                            <asp:Parameter Name="ClientContact" Type="String" />
                            <asp:Parameter Name="ClientAddress" Type="String" />
                            <asp:Parameter Name="ClientState" Type="String" />
                            <asp:Parameter Name="Zip" Type="String" />
                            <asp:Parameter Name="ContactPhoneNumber" Type="String" />
                            <asp:Parameter Name="ContactEmail" Type="String" />
                            <asp:Parameter Name="pId" Type="String" />
                            <asp:Parameter Name="Quantity" Type="Int32" />
                            <asp:Parameter DbType="Date" Name="LastContact" />
                            <asp:Parameter Name="EmployeeId" Type="Int32" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="Sourcing" Type="String" />
                            <asp:Parameter Name="ClientContact" Type="String" />
                            <asp:Parameter Name="ClientAddress" Type="String" />
                            <asp:Parameter Name="ClientState" Type="String" />
                            <asp:Parameter Name="Zip" Type="String" />
                            <asp:Parameter Name="ContactPhoneNumber" Type="String" />
                            <asp:Parameter Name="ContactEmail" Type="String" />
                            <asp:Parameter Name="pId" Type="String" />
                            <asp:Parameter Name="Quantity" Type="Int32" />
                            <asp:Parameter DbType="Date" Name="LastContact" />
                            <asp:Parameter Name="EmployeeId" Type="Int32" />
                            <asp:Parameter Name="SalesOrder" Type="Int32" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                </ContentTemplate>
            </asp:RoleGroup>
            <asp:RoleGroup Roles="SalesTeam">
                <ContentTemplate>
                    <div style="overflow: scroll">
                        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" BackColor="White"
                            BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="SalesOrder"
                            DataSourceID="SqlDataSource1" GridLines="Vertical" Width="100px" 
                            AllowPaging="True" PageSize="5">
                            <AlternatingRowStyle BackColor="#DCDCDC" />
                            <Columns>
                                <asp:CommandField ShowEditButton="True" />
                                <asp:BoundField DataField="SalesOrder" HeaderText="Sales#" InsertVisible="False"
                                    ReadOnly="True" SortExpression="SalesOrder" />
                                <asp:BoundField DataField="Sourcing" HeaderText="Sourcing" SortExpression="Sourcing" />
                                <asp:BoundField DataField="ClientContact" HeaderText="ContactName" 
                                    SortExpression="ClientContact" />
                                <asp:BoundField DataField="ClientAddress" HeaderText="Address" 
                                    SortExpression="ClientAddress" />
                                <asp:BoundField DataField="ClientState" HeaderText="State" 
                                    SortExpression="ClientState" />
                                <asp:BoundField DataField="Zip" HeaderText="Zip" SortExpression="Zip" />
                                <asp:BoundField DataField="ContactPhoneNumber" HeaderText="PhoneNumber" 
                                    SortExpression="ContactPhoneNumber" />
                                <asp:BoundField DataField="ContactEmail" HeaderText="Email" 
                                    SortExpression="ContactEmail" />
                                <asp:BoundField DataField="pId" HeaderText="ProductID" SortExpression="pId" />
                                <asp:BoundField DataField="Quantity" HeaderText="Quantity" SortExpression="Quantity" />
                                <asp:BoundField DataField="LastContact" HeaderText="LastContact" SortExpression="LastContact" />
                            </Columns>
                            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                            <SortedAscendingCellStyle BackColor="#F1F1F1" />
                            <SortedAscendingHeaderStyle BackColor="#0000A9" />
                            <SortedDescendingCellStyle BackColor="#CAC9C9" />
                            <SortedDescendingHeaderStyle BackColor="#000065" />
                        </asp:GridView>
                    </div>
                    <asp:Button ID="btnShow" runat="server" OnClick="btnShow_Click" 
                        Text="Insert New Item" />
                    <asp:DetailsView ID="DetailsView2" runat="server" AutoGenerateRows="False" BackColor="White"
                        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="SalesOrder"
                        DataSourceID="SqlDataSource1" Height="50px" Width="125px" Visible="False">
                        <EditRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                        <Fields>
                            <asp:BoundField DataField="SalesOrder" HeaderText="SalesOrder" InsertVisible="False"
                                ReadOnly="True" SortExpression="SalesOrder" />
                            <asp:BoundField DataField="Sourcing" HeaderText="Sourcing" SortExpression="Sourcing" />
                            <asp:BoundField DataField="ClientContact" HeaderText="ClientContact" SortExpression="ClientContact" />
                            <asp:BoundField DataField="ClientAddress" HeaderText="ClientAddress" SortExpression="ClientAddress" />
                            <asp:BoundField DataField="ClientState" HeaderText="ClientState" SortExpression="ClientState" />
                            <asp:BoundField DataField="Zip" HeaderText="Zip" SortExpression="Zip" />
                            <asp:BoundField DataField="ContactPhoneNumber" HeaderText="ContactPhoneNumber" SortExpression="ContactPhoneNumber" />
                            <asp:BoundField DataField="ContactEmail" HeaderText="ContactEmail" SortExpression="ContactEmail" />
                            <asp:BoundField DataField="pId" HeaderText="pId" SortExpression="pId" />
                            <asp:BoundField DataField="Quantity" HeaderText="Quantity" SortExpression="Quantity" />
                            <asp:BoundField DataField="LastContact" HeaderText="LastContact" SortExpression="LastContact" />
                            <asp:CommandField ShowInsertButton="True" />
                        </Fields>
                        <FooterStyle BackColor="White" ForeColor="#000066" />
                        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                        <RowStyle ForeColor="#000066" />
                    </asp:DetailsView>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                        DeleteCommand="DELETE FROM [Sales] WHERE [SalesOrder] = @SalesOrder" InsertCommand="INSERT INTO [Sales] ([Sourcing], [ClientContact], [ClientAddress], [ClientState], [Zip], [ContactPhoneNumber], [ContactEmail], [pId], [Quantity], [LastContact]) VALUES (@Sourcing, @ClientContact, @ClientAddress, @ClientState, @Zip, @ContactPhoneNumber, @ContactEmail, @pId, @Quantity, @LastContact)"
                        SelectCommand="SELECT [SalesOrder], [Sourcing], [ClientContact], [ClientAddress], [ClientState], [Zip], [ContactPhoneNumber], [ContactEmail], [pId], [Quantity], [LastContact] FROM [Sales] ORDER BY [SalesOrder]"
                        UpdateCommand="UPDATE [Sales] SET [Sourcing] = @Sourcing, [ClientContact] = @ClientContact, [ClientAddress] = @ClientAddress, [ClientState] = @ClientState, [Zip] = @Zip, [ContactPhoneNumber] = @ContactPhoneNumber, [ContactEmail] = @ContactEmail, [pId] = @pId, [Quantity] = @Quantity, [LastContact] = @LastContact WHERE [SalesOrder] = @SalesOrder">
                        <DeleteParameters>
                            <asp:Parameter Name="SalesOrder" Type="Int32" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="Sourcing" Type="String" />
                            <asp:Parameter Name="ClientContact" Type="String" />
                            <asp:Parameter Name="ClientAddress" Type="String" />
                            <asp:Parameter Name="ClientState" Type="String" />
                            <asp:Parameter Name="Zip" Type="String" />
                            <asp:Parameter Name="ContactPhoneNumber" Type="String" />
                            <asp:Parameter Name="ContactEmail" Type="String" />
                            <asp:Parameter Name="pId" Type="String" />
                            <asp:Parameter Name="Quantity" Type="Int32" />
                            <asp:Parameter DbType="Date" Name="LastContact" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="Sourcing" Type="String" />
                            <asp:Parameter Name="ClientContact" Type="String" />
                            <asp:Parameter Name="ClientAddress" Type="String" />
                            <asp:Parameter Name="ClientState" Type="String" />
                            <asp:Parameter Name="Zip" Type="String" />
                            <asp:Parameter Name="ContactPhoneNumber" Type="String" />
                            <asp:Parameter Name="ContactEmail" Type="String" />
                            <asp:Parameter Name="pId" Type="String" />
                            <asp:Parameter Name="Quantity" Type="Int32" />
                            <asp:Parameter DbType="Date" Name="LastContact" />
                            <asp:Parameter Name="SalesOrder" Type="Int32" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                </ContentTemplate>
            </asp:RoleGroup>
            <asp:RoleGroup Roles="MarketingTeam">
                <ContentTemplate>
                    <div style="overflow: scroll">
                        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" BackColor="White"
                            BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="SalesOrder"
                            DataSourceID="SqlDataSource1" GridLines="Vertical" Width="100px" 
                            AllowPaging="True" PageSize="5">
                            <AlternatingRowStyle BackColor="#DCDCDC" />
                            <Columns>
                                <asp:CommandField ShowEditButton="True" />
                                <asp:BoundField DataField="SalesOrder" HeaderText="Sales#" InsertVisible="False"
                                    ReadOnly="True" SortExpression="SalesOrder" />
                                <asp:BoundField DataField="Sourcing" HeaderText="Sourcing" SortExpression="Sourcing" />
                                <asp:BoundField DataField="ClientContact" HeaderText="ContactName" 
                                    SortExpression="ClientContact" />
                                <asp:BoundField DataField="LastContact" HeaderText="LastContact" SortExpression="LastContact" />
                            </Columns>
                            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                            <SortedAscendingCellStyle BackColor="#F1F1F1" />
                            <SortedAscendingHeaderStyle BackColor="#0000A9" />
                            <SortedDescendingCellStyle BackColor="#CAC9C9" />
                            <SortedDescendingHeaderStyle BackColor="#000065" />
                        </asp:GridView>
                    </div>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                        DeleteCommand="DELETE FROM [Sales] WHERE [SalesOrder] = @SalesOrder" InsertCommand="INSERT INTO [Sales] ([Sourcing], [ClientContact], [LastContact]) VALUES (@Sourcing, @ClientContact, @LastContact)"
                        SelectCommand="SELECT [SalesOrder], [Sourcing], [ClientContact], [LastContact] FROM [Sales] ORDER BY [SalesOrder]"
                        UpdateCommand="UPDATE [Sales] SET [Sourcing] = @Sourcing, [ClientContact] = @ClientContact, [LastContact] = @LastContact WHERE [SalesOrder] = @SalesOrder">
                        <DeleteParameters>
                            <asp:Parameter Name="SalesOrder" Type="Int32" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="Sourcing" Type="String" />
                            <asp:Parameter Name="ClientContact" Type="String" />
                            <asp:Parameter DbType="Date" Name="LastContact" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="Sourcing" Type="String" />
                            <asp:Parameter Name="ClientContact" Type="String" />
                            <asp:Parameter DbType="Date" Name="LastContact" />
                            <asp:Parameter Name="SalesOrder" Type="Int32" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                </ContentTemplate>
            </asp:RoleGroup>
        </RoleGroups>
    </asp:LoginView>
</asp:Content>
